import { INCREMENT, DECREMENT, ADDODD, ADDASYNC } from "../constant";
export const increment = (value) => ({ type: INCREMENT, value })
export const decrement = (value) => ({ type: DECREMENT, value })
// 奇数加
export const addOdd = (value) => ({ type: ADDODD, value })
// 异步加
export const addAsync = (value) => {
  return (dispatch) => {
    setTimeout(() => {
      dispatch(increment(value))
    }, 1000);
  }
}